all: clean
	javac -encoding utf8 -cp lib/servlet-api.jar:lib/jdom.jar -d classes/ -sourcepath src/ `find src -name '*.java'`

jar: all
	@rm -rf work/tmp/jar
	@VERSION="`date +%Y%m%d`v`cat STATUS | grep '^version=' | cut -f 2 -d =`"; \
	JAR="work/dist/JyRC-$$VERSION.jar"; \
	mkdir -p work/tmp/jar/{data,jyrc} && \
	cp -rf classes/data/* work/tmp/jar/data/ && cp -rf classes/jyrc/* work/tmp/jar/jyrc && \
	jar cvfm $$JAR src/MANIFEST.MF -C work/tmp/jar/ . && \
	svn add --quiet --force $$JAR; \
	echo \ \*\ $$JAR ; \
	ln  -sf `basename $$JAR` work/dist/JyRC-current.jar

clean:
	find classes/ -name '*.class' -exec rm -rf \{\} \;



srcclean:
	find . -name '*~' -delete
	find work/dist -name '*.jar' -ctime +28 -exec svn del --force \{\} \;





svnckt:
	svn checkout https://jyrc.googlecode.com/svn/ .

svncit:
	read txt ; svn commit -m "$$txt"



wup: jar
	rm -rf .www/ROOT/* && cp -RL www/* .www/ROOT
	find .www -name '.svn' -delete
